package com.hdu.clj.dncard.database

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.util.Log

/**
* eid 装备id
* attack 装备攻击力
* defence 装备防御力
* wisdom 装备智力加成
* life 装备生命加成
*/
class EquipmentDatabase(val context: Context, name:String, version:Int): SQLiteOpenHelper(context,name,null,version) {
    private val dayNumBook = "create table Equip (" +
            "id integer primary key autoincrement," +
            "eid text unique," +
            "attack integer," +
            "defence integer," +
            "wisdom integer," +
            "elife integer," +
            "ename text)"

    override fun onCreate(db: SQLiteDatabase) {
        db.execSQL(dayNumBook)
        Log.d("curdata","create equip")
    }

    override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {

    }
}